<script>
function checkform(){
	var from_station_id=$('input[name="from_station_id"]').val();
	if(from_station_id=='0'){
		alert('请填写出发地!');
		return false;		
	}
	var to_station_id=$('select[name="to_station_id"]').val();
	if(to_station_id=='0'){
		alert('请填写目的地!');
		return false;		
	}
	var carrier=$('select[name="carrier"]').val();
	if(trim(carrier)==''){
		alert('请选择物流商!');
		return false;		
	}
	var weight=$('input[name="weight"]').val();
	if(trim(weight)==''){
		alert('请填写重量!');
		return false;		
	}
	/*
	var first_weight=$('input[name="first_weight"]').val();
	if(trim(first_weight)==''){
		alert('请填写首重!');
		return false;		
	}
	var addition_weight=$('input[name="addition_weight"]').val();
	if(trim(addition_weight)==''){
		alert('请填写附加重!');
		return false;		
	}*/
	var days=$('input[name="days"]').val();
	if(trim(days)==''){
		alert('请填写天数!');
		return false;		
	}
	/*
	var fuel_surcharge=$('input[name="fuel_surcharge"]').val();
	if(trim(fuel_surcharge)==''){
		alert('请填写燃油附加费!');
		return false;		
	}*/
	var description=$('textarea[name="en_description"]').val();
	if(trim(description)==''){
		alert('请填写描述!');
		return false;		
	}

	$('#addFeatureForm').submit();
}
</script>
<div class="frame_addfactoryDiv">
  <form name="addFeatureForm" id="addFeatureForm" enctype="multipart/form-data"  action="administrator<?=CHOSING_DE?>express<?=CHOSING_DE?>doaddi" method="post">
  <table width="100%" border="1" cellpadding="0" cellspacing="0" bordercolor="#c8d9e9">
    <tr>
      <td width="15%" class="ri-bbgg"><span class="red">*</span> 出发地：</td>
      <td width="85%" class="le">
	  	<select name="from_station_id">
			<option value="0">选择目的地</option>
			<?foreach($this->locationArray as $value):?>
				<option value="<?=$value['flid']?>"><?=$value['en_flname']?></option>
			<?endforeach;?>
		</select>
	  </td>
    </tr>
    <tr>
      <td width="15%" class="ri-bbgg"><span class="red">*</span> 目的地：</td>
      <td width="85%" class="le">
	  	<select name="to_station_id">
			<option value="0">选择目的地</option>
			<?foreach($this->locationArray as $value):?>
				<option value="<?=$value['flid']?>"><?=$value['en_flname']?></option>
			<?endforeach;?>
		</select>
	  </td>
    </tr>
	<tr>
      <td width="15%" class="ri-bbgg"><span class="red">*</span> 物流商：</td>
      <td width="85%" class="le">
	  	<select name="carrier">
			<option value="0">选择物流公司</option>
			<?foreach($this->companyArray as $value):?>
				<option value="<?=$value['companyid']?>"><?=$value['company_name']?></option>
			<?endforeach;?>
		</select>
	  </td>
    </tr>
	<tr>
      <td width="15%" class="ri-bbgg"><span class="red">*</span> 类型：</td>
      <td width="85%" class="le">
	  	<input type="radio" value="0" name="type" checked />包裹&nbsp;&nbsp;
		<input type="radio" value="1" name="type" />文件
	  </td>
    </tr>
	<tr>
      <td width="15%" class="ri-bbgg"><span class="red">*</span> 重量：</td>
      <td width="85%" class="le">
	  	<input type="text" name="weight" maxlength="30" value="" id="name">
	  </td>
    </tr>
	<tr>
      <td width="15%" class="ri-bbgg"><span class="red">*</span> 价格：</td>
      <td width="85%" class="le">
	  	<input type="text" name="price" maxlength="30" value="" id="name">
	  </td>
    </tr>
	<tr>
      <td width="15%" class="ri-bbgg"><span class="red">*</span> 首重：</td>
      <td width="85%" class="le">
	  	<input type="text" name="first_weight" maxlength="30" value="" id="name">
	  </td>
    </tr>
	<tr>
      <td width="15%" class="ri-bbgg"><span class="red">*</span> 附加重：</td>
      <td width="85%" class="le">
	  	<input type="text" name="addition_weight" maxlength="30" value="" id="name">
	  </td>
    </tr>
	<tr>
      <td width="15%" class="ri-bbgg"><span class="red">*</span> 天数：</td>
      <td width="85%" class="le">
	  	<input type="text" name="days" maxlength="30" value="" id="name">
	  </td>
    </tr>
	<tr>
      <td width="15%" class="ri-bbgg"><span class="red">*</span> 描述（英文）：</td>
      <td width="85%" class="le">
	  	<textarea style="width:300px;height:80px" name="en_description"></textarea>
	  </td>
    </tr>
	<tr>
      <td width="15%" class="ri-bbgg"><span class="red">*</span> 描述（中文）：</td>
      <td width="85%" class="le">
	  	<textarea style="width:300px;height:80px" name="cn_description"></textarea>
	  </td>
    </tr>
	<tr>
      <td width="15%" class="ri-bbgg"><span class="red">*</span> 是否推荐：</td>
      <td width="85%" class="le">
	  	<input type="radio" value="1" name="is_recommended" checked />是&nbsp;&nbsp;
		<input type="radio" value="0" name="is_recommended" />否
	  </td>
    </tr>
    <tr>
      <td colspan="2" class="se" align="center">
        <input name="button2" type="button" class="iput" value="保 存"   onclick="checkform();" />　　
        <input name="button" type="button" class="iput" value="返 回" onclick="commonEffection.confirmBack();" />
      </td>
    </tr>
  </table>
</div>
<script>
$('select[name="from_station_id"]').val('1');
</script>